
public class Player extends Actor {
	private int health;
	private int attPow;
	private int maxHealth;
	
	public Player(int health,int attPow){
		super(0,0);
		maxHealth=health;
		this.health=health;
		this.attPow=attPow;
	}
	
	/**
	 * This will return the current health.
	 * 
	 * @return The current health
	 */
	public int getHealth() {
		return health;
	}

	/**
	 * This will return the current attack power.
	 * 
	 * @return The current attack power
	 */
	public int getAttackPower() {
		return attPow;
	}

	/**
	 * This will update the health of the Player when they take damage. It will also call die if they die.
	 * 
	 * @param dam The amount of damage taken.
	 */
	public void takeDamage(int dam) {
		// TODO Auto-generated method stub
		health-=dam;
		if(health<=0){
			health=0;
			die();
		}
	}
	
	public void die(){
		//Put death here.
	}
	
	public void changeDirection(int which,int amount){
		if(which >= 1)
			vector[1]+=amount;
		else
			vector[0]+=amount;
	}

	public void heal(int amount){
		if(health+amount>maxHealth)
			health=maxHealth;
		else
			health+=amount;
	}
}
